﻿<%@ Page Title="" Language="C#" MasterPageFile="~/administrator/site.master" AutoEventWireup="true" CodeFile="menu-sanpham.aspx.cs" Inherits="administrator_menu_sanpham" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style>
.hide{display:none;}
.table-format{border: 1px solid gray; width: 348px; float: left;}
.floatright{float:right; width: 348px;}
tr.th{background: url(images/bg-head-grid.gif) repeat-x; height: 26px;}
tr.even{height: 24px; background: gainsboro;}

</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        
    <table>
        <tr>
            <td>Nhập tên menu:</td><td><asp:TextBox runat="server" Width="200" ID="txtmenu"></asp:TextBox>
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/tick_button.png" OnClick="AddMenu"/>
            </td>
        </tr>
        <tr>
            <td>Cập nhật<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="images/tick_octagon.png" OnClick="UpdateMenu"/></td><td>Xóa<asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="images/folder_closed_delete.png" OnClick="DeleteMenu"/></td>
        </tr>
        <tr>
            <td colspan="2"><span style="display:block; width: 200px; float: left"><asp:Label runat="server" ID="lblthongbao" ForeColor="red"></asp:Label></span></td>
        </tr>
    </table>
    
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
              <ProgressTemplate>
<div id="Div1" align="center" valign="middle" runat="server" style="position: absolute;left: 55%;top: 35%;">
                      <asp:Image ID="Image1" runat="server" ImageUrl="images/zme_loading.gif" />
</div>
              </ProgressTemplate>
</asp:UpdateProgress>

   <table class="table-format">
    <tr class="th">
        <th>Tên menu</th><th>Chọn xóa</th><th>Chọn sửa</th>
    </tr>
    <asp:Repeater runat="server" ID="rptmnu" OnItemCommand="UpdateCheck">
        <ItemTemplate>
         <tr><td><asp:Label runat="server" ID="lblid" CssClass="hide" Text='<%#Eval("Cate_ID") %>'></asp:Label><%#Eval("Name") %></td>
            <td><asp:CheckBox runat="server" ID="chk"/></td><td><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/tick_octagon.png" CommandName="edit"/></td></tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
                <tr class="even"><td><asp:Label runat="server" ID="lblid" CssClass="hide" Text='<%#Eval("Cate_ID") %>'></asp:Label><%#Eval("Name") %></td>
            <td><asp:CheckBox runat="server" ID="chk"/></td><td><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/tick_octagon.png" CommandName="edit"/></td></tr>
        </AlternatingItemTemplate>
    </asp:Repeater>
   
   </table>

            <%-- menu con--%>
  <asp:Panel runat="server" ID="Panel1" CssClass="floatright">
   <table>
        <tr>
            <td>Nhập tên menu con:</td><td><asp:TextBox runat="server" Width="200" ID="txtmenucon"></asp:TextBox>
                <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="images/tick_button.png" OnClick="AddMenuCon"/>
            </td>
        </tr>
        <tr>
            <td>Cập nhật<asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="images/tick_octagon.png" OnClick="UpdateMenuCon"/></td><td>Xóa<asp:ImageButton ID="ImageButton6" runat="server" ImageUrl="images/folder_closed_delete.png" OnClick="DeleteMenuCon"/></td>
        </tr>
    </table>
    <asp:Label runat="server" ID="lblthongbao1" ForeColor="red"></asp:Label>
   <table class="table-format">
    <tr class="th">
        <th>Tên menu</th><th>Chọn xóa</th><th>Chọn sửa</th>
    </tr>
    <asp:Repeater runat="server" ID="rptmnucon" OnItemCommand="UpdateCheckCon">
        <ItemTemplate>
         <tr><td><asp:Label runat="server" ID="lblidcon" CssClass="hide" Text='<%#Eval("Cate_ID") %>'></asp:Label><%#Eval("Name") %></td>
            <td><asp:ImageButton runat="server" ID="ibtdelchild" ImageUrl="images/list1_delete.png" CommandName="delete"/></td><td><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/tick_octagon.png" CommandName="edit"/></td></tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
                <tr class="even"><td><asp:Label runat="server" ID="lblidcon" CssClass="hide" Text='<%#Eval("Cate_ID") %>'></asp:Label><%#Eval("Name") %></td>
            <td><asp:ImageButton runat="server" ID="ibtdelchild" ImageUrl="images/list1_delete.png" CommandName="delete"/></td><td><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/tick_octagon.png" CommandName="edit"/></td></tr>
        </AlternatingItemTemplate>
    </asp:Repeater>
   
   </table>
   </asp:Panel>
   </ContentTemplate>
    </asp:UpdatePanel>


</asp:Content>


